package top.goldenyear.porpoise.common.core.exception;

import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 错误码对象
 *
 * <p>TODO 错误码设计成对象的原因，为未来的 i18 国际化做准备
 *
 * @author airhead
 */
@Data
@NoArgsConstructor
@Builder
@Accessors(chain = true)
public class ErrorCode {

  /** 错误码 */
  private Integer code;

  /** 错误提示 */
  private String msg;

  public ErrorCode(Integer code, String msg) {
    this.code = code;
    this.msg = msg;
  }
}
